import http, { baseURL } from './index'

export const login = (params) => http({
  url: '/applogin',
  method: 'POST',
  params,
})

export const getMenu = () => http({
  url: '/device-os/router',
  method: 'GET',
})
export const checkHost = () => http({
  url: '/cmd',
  method: 'GET',
})
export const getAcross = () => http({
  url: '/verify/licenseSequences',
  method: 'GET',
})

export const getPhoto = (imgName) => {
  return `${baseURL}images/${imgName}`
}

export const getExcel = (imgName) => {
  return `${baseURL}temp/excel/${imgName}`
}

export const getImg = (imgName) => {
  return `${baseURL}temp/cut/${imgName}`
}

export const appUploadLogoU = (data) => http({
  url: '/device-os/appUploadLogo',
  method: 'POST',
  data,
  headers: {
    'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
  },
})
export const licenseVerify = (data) => http({
  url: '/verify/licenseVerify',
  method: 'POST',
  data,
})